/*请求url*/
var urlData = require("../../../../../data/url.js");

var theArr = {
  list: [{
    content: "111",
    nexing: "xxxx",
    startTime: 20162222,
    endTime: 20198888,
    classId:0,  
   tupian: "../../../../../image/作业.jpg"
  },
  {
    content: "222",
    nexing: "yyy",
    startTime: 20168888,
    endTime: 20192222,
    tupian: "../../../../../image/hhh.jpg",
    classId: 2,
  }]
};

Page({ 
    fabu: function () {
      wx.navigateTo({
         url: '../organ-homework-teacherUpload/organ-homework-teacherUpload'
      })
    },
    data: {
      newarray:theArr.list,
      classId:0,
      onloadUrl: urlData.urlList.organManage.organHomework.teacherMore.url
     },
  /**
 * 生命周期函数--监听页面加载
 */
  onLoad: function (options) {
    //读出本地数据缓存
    wx.getStorage({
      key: "organHomeworkListConf",
      success: function (res) {
        // console.log(res.data)
        that.setData({
          classId: e.currentTarget.dataset.classid
        });
      }
    });
    var that = this;
    wx.request({
      url: this.data.onloadUrl,
      method: "get",
      data: {
        //qqq: this.data.allchecked
        //后台接到qqq:true
        course_id,
      },
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      success: function (res) {
        if (res.data.code == 0) {
          that.listData(e, res);
        }
      },
      fail: function (res) {
        console.log('刷list数据失败');
      }
    })
  },

  /*刷新数据*/
  listData: function (e, res) {
    this.setData({
      newarray: theArr.list,//res.data.list,
    });
  },
})